package com.example.server.controller;

import cn.example.server.dto.User;
import com.example.server.service.RestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: YAOZUN
 * @Date: Created in 17:07 2018/12/18 0018
 * @Description:
 */
@RestController
@RequestMapping("/transmission")
public class ServiceController {

    @Autowired
    RestService restService;
    @PostMapping("/postRest")
    public String postRest(String msg){
        return restService.postString(msg);
    }
    @GetMapping("/getRest")
    public String getRest(String msg){
        return restService.getString(msg);
    }
    @GetMapping("/getRestBigMsg")
    public List<User> getRestBigMsg(){
        return restService.bigMsg();
    }
}
